package com.syf.config.result;

/**
 * 请求状态枚举类
 */
public enum RequestStatusEnum implements ResultCodeEnum{

    /**
     * 请求成功
     */
    REQUESR_SUCCESS(0,"请求成功"),
    UPDATE_SUCCESS(0,"更新成功"),
    DELETE_SUCCESS(0,"删除成功"),
    ADD_SUCCESS(0,"添加成功"),

    /** 请求失败 */
    REQUEEST_ERROR(500,"操作失败"),

    /** 无效参数 */
    PARAM_IS_INVALID(400,"无效参数"),

    SYSTEM_INNER_ERROR(500, "未知错误");

    private int code;
    private String msg;

    RequestStatusEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
    @Override
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
